fix(cli): warn on silent embedder degradation in update paths - #1852
Open
sloemo01 wants to merge 1 commit into
Open
fix(cli): warn on silent embedder degradation in update paths#1852sloemo01 wants to merge 1 commit into
sloemo01 wants to merge 1 commit into
Conversation
The embedder-degradation fallback was reported once per call site, not once per invocation. A single 'repowise update' builds the embedder for its decision semantic-dedup store and again for the deterministic page path, so a repo with an unavailable embedder printed the same full warning twice in one run (and a workspace update once per repo). build_embedder's degradation warning now fires at most once per process, matching the init header probe, with a reset hook so tests and embedded runners can re-arm it for the next logical invocation.
Ayush7614
approved these changes
Aug 22, 2026
Ayush7614
left a comment
Contributor
There was a problem hiding this comment.
Verified via diff: adds once-per-invocation gate _degradation_warned in packages/cli/src/repowise/cli/providers/embedders.py:1 with reset_degradation_warning() for tests, and autouse re-arm in conftest.py. Fixes R3 gap #852/#1370 where repowise update built embedder twice (incremental + deterministic) and spammed identical warnings. Tests cover 3 builds warn once + reset re-arms. Clean, no fake/unneeded code — LGTM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Closes the residual R3 gap from #852/#1370: embedder-degradation warnings were reported once per call site instead of once per invocation.
repowise updatebuilds the embedder for its decision semantic-dedup store (incremental.py) and again for the deterministic page path (deterministic.py); a workspace update builds one per repo. When an embedder is unavailable,build_embedderprinted the same full "could not be built" warning for every build, stacking the identical sentence multiple times in one run and burying the signal.build_embedder's degradation warning now fires at most once per process — matching the once-per-invocation gate the init header probe uses — so the first build of a run reports the degradation and later builds in the same invocation stay quiet.Why now
reindex,generate,upgrade_flow, doctor's repo repair, and the deterministic page path all route throughbuild_embedder, so this single gate covers all the R3 sites named in cli: update deterministic page path and other embedder builds still degrade silently (R3 coverage) #1370 at once, including theupdatedeterministic path.Change
packages/cli/src/repowise/cli/providers/embedders.py— once-per-invocation gate (_degradation_warned) around the degradation warning, plus areset_degradation_warning()hook so tests / embedded runners can re-arm it.tests/unit/cli/test_embedder_resolution.py— tests that three degraded builds in one invocation warn exactly once, and that the warning returns after a reset.tests/unit/cli/conftest.py— autouse fixture re-arms the gate between tests.QA
ruff checkandruff format --checkclean on changed files.